diff options
| author | Adam Soltys <[email protected]> | 2023-08-14 22:32:58 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-08-14 22:32:58 -0700 |
| commit | 1d55903cce0d1914ec21ff31d8ae2b4dcb4fa64d (patch) | |
| tree | 090f3941fccc4a7532fe703a2b6eea313061ad5d /src/routes/(app)/[username] | |
| parent | 1de7b98a219fc3872aa6218e7e9e78ab56803d5e (diff) | |
| download | coinos-ui-1d55903cce0d1914ec21ff31d8ae2b4dcb4fa64d.tar.gz coinos-ui-1d55903cce0d1914ec21ff31d8ae2b4dcb4fa64d.zip | |
more options link for using external wallets
Diffstat (limited to 'src/routes/(app)/[username]')
| -rw-r--r-- | src/routes/(app)/[username]/invoice/[hash]/+layout.server.js | 2 | ||||
| -rw-r--r-- | src/routes/(app)/[username]/invoice/[hash]/+page.svelte | 21 |
2 files changed, 12 insertions, 11 deletions
diff --git a/src/routes/(app)/[username]/invoice/[hash]/+layout.server.js b/src/routes/(app)/[username]/invoice/[hash]/+layout.server.js index 875c4e11..eef24555 100644 --- a/src/routes/(app)/[username]/invoice/[hash]/+layout.server.js +++ b/src/routes/(app)/[username]/invoice/[hash]/+layout.server.js @@ -9,7 +9,7 @@ export async function load({ depends, params, url, parent }) { let { hash } = params; let invoice = await get(`/invoice/${hash}`); - if (user && invoice.uid !== user.id && !url.pathname.includes('tip')) + if (user && invoice.uid !== user.id && !url.pathname.includes('tip') && !url.searchParams.get('options')) throw redirect(307, `/send/invoice/${hash}`); let { amount, pending, received } = invoice; diff --git a/src/routes/(app)/[username]/invoice/[hash]/+page.svelte b/src/routes/(app)/[username]/invoice/[hash]/+page.svelte index 63b4abdb..508550ba 100644 --- a/src/routes/(app)/[username]/invoice/[hash]/+page.svelte +++ b/src/routes/(app)/[username]/invoice/[hash]/+page.svelte @@ -179,13 +179,22 @@ </div> {/if} - <div class="text-center"> + <div class="text-center break-all"> <a href={link}> - {txt.substr(0, 20)}...{txt.substr(-20)} + {txt} </a> </div> <div class="w-full flex justify-center gap-2 flex-wrap"> + <a href={link} class="w-full md:w-auto"> + <button + class="w-full md:w-auto flex justify-center rounded-full border py-3 px-5 hover:opacity-80" + > + <Icon icon="mobile" style="mr-1 w-6" /> + <div class="text-secondary">{$t('payments.openLink')}</div> + </button> + </a> + <button class="flex rounded-full justify-center border py-3 px-5 hover:opacity-80 w-full md:w-auto" on:click={() => copy(txt)} @@ -193,14 +202,6 @@ <Icon icon="copy" style="mr-1" /> <div class="text-secondary">{$t('payments.copyText')}</div></button > - <a href={link} class="w-full md:w-auto"> - <button - class="w-full md:w-auto flex justify-center rounded-full border py-3 px-5 hover:opacity-80" - > - <Icon icon="link" style="mr-1 w-6" /> - <div class="text-secondary">{$t('payments.openLink')}</div> - </button> - </a> <button class="w-full md:w-auto flex justify-center rounded-full border py-3 px-5 hover:opacity-80" |
